package com.zmn.oms.common.dio.wallquotation;

import com.zmn.mcc.dubbo.dto.DubboConsts;
import com.zmn.oms.common.dto.OmsOperator;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 计算墙面订单价格入参
 *
 * @author chengguang
 * @date 2022/05/26
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class WallOrderAmountDIO extends OmsOperator implements Serializable {

    private static final long serialVersionUID = -7302821400212328764L;

    @ApiModelProperty(value = "产品id",required = true)
    @NotNull(message = "productId不能为空")
    @Positive(message = "productId必须大于0")
    private Integer productId;

    /**
     * 优惠规则ID
     */
    @ApiModelProperty(value = "优惠规则ID")
    private Integer promId;

    @ApiModelProperty(value = "服务项集合",required = true)
    @NotEmpty(message = "wallServItems参数不能为空且个数不能超过" + DubboConsts.DUBBO_RESULT_MAX_NUMBER)
    @Size(min = 1, max = DubboConsts.DUBBO_RESULT_MAX_NUMBER,message = "wallServItems参数不能为空且个数不能超过" +
            DubboConsts.DUBBO_RESULT_MAX_NUMBER)
    private List<WallServItemDIO> wallServItems;

    @ApiModelProperty(value = "故障ID集合",required = true)
    @NotEmpty(message = "faultIds参数不能为空且个数不能超过" + DubboConsts.DUBBO_RESULT_MAX_NUMBER)
    @Size(min = 1, max = DubboConsts.DUBBO_RESULT_MAX_NUMBER,message = "faultIds参数不能为空且个数不能超过" +
            DubboConsts.DUBBO_RESULT_MAX_NUMBER)
    private List<Integer> faultIds;

    @ApiModelProperty(value = "人工优惠金额")
    @Positive(message = "discountAmount必须大于0")
    private Integer discountAmount;

}
